package task;

import model.AgriculturalMachine;

public class JobTask {
    private String taskName;
    private AgriculturalMachine machine;

    public JobTask(String taskName, AgriculturalMachine machine) {
        this.taskName = taskName;
        this.machine = machine;
    }

    public void execute() {
        System.out.println("执行任务: " + taskName + "，设备: " + machine.getClass().getSimpleName());
        machine.start();
    }
}